powered by
Label or otherwise retrieve labels from objects of either class tidy_dagitty or dagitty
tidy_dagitty
dagitty
label(x) <- value# S3 method for dagitty label(x) <- value# S3 method for tidy_dagitty label(x) <- valuedag_label(.tdy_dag, labels = NULL)label(.tdy_dag)has_labels(.tdy_dag)
# S3 method for dagitty label(x) <- value
# S3 method for tidy_dagitty label(x) <- value
dag_label(.tdy_dag, labels = NULL)
label(.tdy_dag)
has_labels(.tdy_dag)
label returns the label attribute of x
label
an object of either class tidy_dagitty or dagitty
a character vector
an object of class tidy_dagitty
labelled_dag <- dagify(y ~ z, x ~ z) %>% tidy_dagitty() %>% dag_label(labels = c("x" = "exposure", "y" = "outcome", "z" = "confounder")) has_labels(labelled_dag)
Run the code above in your browser using DataLab